/*
 * @Description:
 * @Autor: 刘诗文
 * @Date: 2020-11-24 13:30:30
 * @LastEditors: 刘诗文
 * @LastEditTime: 2021-02-01 17:17:23
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 车辆过户查询
export const getTransferList = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/vehicleOwnerManagement/vehicleChange/getVehicleChangeList`, { params });

// 车辆过户保存
export const saveVehicleChange = params => axios.post(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/vehicleOwnerManagement/vehicleChange/saveVehicleChange`, params);

// 查询车主信息
export const getOwnerInfo = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/vehicleOwnerManagement/vehicleChange/findTransferList`, { params });

// 车辆过户查询车主信息
export const queryOwnerList = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/vehicleOwnerManagement/vehicleChange/queryOwnerList`, { params });

// 查询车辆信息
export const getVehicleInfo = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/vehicleOwnerManagement/vehicleChange/queryVehicleList`, { params });

//车辆过户导出
export const getVehicleTransferExport = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/vehicleOwnerManagement/vehicleChange/export`, { params, responseType: 'blob' }); // timeout: 600000 设置为10分钟 7万条数据 返回157MB时后端服务内存溢出崩溃 故去除

// 查询经销商列表（不分页）
export const getDearlerListByTranslate = params => axios.get(`/api/cmscloud.channel/message/dealerAttach/dealerInfo/byAllTranslate`, { params });

// 查询经销商列表
export const getDearlerList = params => axios.get(`/api/cmscloud.channel/message/dealerAttach/dealerInfo/byAllInfo`, { params });

// 查询事业部 - 下拉框
export const getOrgList = params => axios.get(`${SERVER.SYSMANAGE}/org/getOrgList`, { params });

// 车主关键信息变更查询
export const getKeyInfoChangeList = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/vehicleOwnerManagement/ownerChange/findAll`, { params });

// 车主关键信息变更保存
export const saveKeyInfoChange = params => axios.post(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/vehicleOwnerManagement/ownerChange/save`, params);

// 车主关键信息变更导出
export const getKeyInfoChangeExport = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/vehicleOwnerManagement/ownerChange/export`, { params, responseType: 'blob' });

// 车主关键信息变更审核明细查询
export const getKeyInfoChangeCheckList = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/vehicleOwnerManagement/ownerChange/getDetails`, { params });

// 车主关键信息变更审核明细查询
export const getRetailInfoForAfterSale = params => axios.get(`${SERVER.RETAIL}/saleAfterInter/getRetailInfoForAfterSale`, { params });

